package yxy.game.pm2.chat.module;

import yxy.game.pm2.bean.area.ChatChannelType;

public class ChatChannel_World extends BaseChatChannelModule {
	private int clusterId; //专服id
	private int areaGroupId; //战区id

	public int getClusterId() {
		return clusterId;
	}

	public void setClusterId(int clusterId) {
		this.clusterId = clusterId;
	}

	public int getAreaGroupId() {
		return areaGroupId;
	}

	public void setAreaGroupId(int areaGroupId) {
		this.areaGroupId = areaGroupId;
	}

	public ChatChannel_World (int areaGroupId) {
		this.setAreaGroupId(areaGroupId);
	}

	@Override
	protected int historySize() {
		return 20;
	}

	@Override
	protected ChatChannelType getChannelType() {
		return ChatChannelType.CHAT_WORLD;
	}

	@Override
	protected String key() {
		return String.format("CHAT:WORLD:%s:MSG", getAreaGroupId());
	}

	@Override
	protected String keySub() {
		return String.format("CHAT:WORLD:%s:SUB", getAreaGroupId());
	}

	public static ChatChannel_World get (int areaGroupId) {
		return new ChatChannel_World(areaGroupId);
	}

}
